﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PresentationLayer
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Session.Remove("UserLoggedIn");
            if (Request.Cookies["UsersRole"] != null)
            {
                HttpCookie roleCookie = new HttpCookie("UsersRole");
                roleCookie.Expires = DateTime.Now.AddDays(-1d);
                Response.Cookies.Add(roleCookie);
            }
            Response.Redirect("/Login.aspx");
        }
    }
}